<html ng-app="app">
<head>
    <meta charset="utf-8" >
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="format-detection" content="telephone=no" />
    <meta name="msapplication-tap-highlight" content="no" />
    <title>房卡包</title>
    <script type="text/javascript" src="http://faxm.13w.top:2092/xxds/files/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="http://faxm.13w.top:2092/xxds/files/js/angular.min.js"></script>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js" ></script>
    <script type="text/javascript" src="http://faxm.13w.top:2092/xxds/files/js/fastclick.js"></script>
    <script type="text/javascript" src="http://faxm.13w.top:2092/xxds/files/js/clipboard.min.js"></script>


    <style>
      #qrDiv,#qrImg{left:-1000%}
        .pointBag{}
        .pointBox{
            filter:alpha(opacity=50); /*IE*/
            -moz-opacity:50; /*FireFox*/
            opacity:0.5;
            background:#000;
            border-radius:8px;
            width:160px;height:160px;position:fixed;top:50%;left:50%;margin-left:-80px;margin-top:-80px;
        }
        .pointIcon{
            position:fixed;top:50%;left:50%;margin-left:-42px;margin-top:-70px;
        }
        .pointTxt{
            position:fixed;top:50%;left:50%;text-align:center;color:#fff;font-size:18px; margin-top:30px; width:160px;margin-left:-80px;
        }
        .pointIcon2{
            position:fixed;top:50%;left:50%;float:left;margin-left:-50px;margin-top:-70px;
        }

        .copy-tip {
            background: rgba(0, 0, 0, .6);
            color: #fff;
            position: fixed;
            bottom: 16.6rem;
            font-size: .9rem;
            border-radius: 5px;
            padding: 10px;
            left: 50%;
            transform: translate(-50%, 0);
            z-index: 89;
        }

        #room_str {
            position: fixed;
            top: -300px;
        }

        .zhuonuo {
            position: fixed;
            right: 0;
            width: 5.8rem;
            z-index: 89;
            top: 1.8rem;
        }

        #dialog {
            position: fixed;
            width: 300px;
            height: 150px;
            padding: 10px;
            box-sizing: border-box;
            background: #fff;
            font-size: 16px;
            left: 50%;
            top: 50%;
            margin-left: -150px;
            margin-top: -75px;
            border-radius: 10px;
            z-index: 99;
        }

        #dialog .main {
            word-wrap: break-word;
            word-break: normal;
        }

        #dialog .other {
            text-align: center;
            margin-top: 30px
        }

        #dialog img {
            position: absolute;
            top: -20px;
            right: -20px;
            width: 35px;
        }
    </style>
</head>
<link rel="stylesheet" type="text/css" href="http://faxm.13w.top:2092/xxds/files/css/activity.css">

<body ng-controller="myCtrl" style="background: #eeb053;" >
     <img src="http://faxm.13w.top:2092/xxds/files/images/index/common_back.png" style="position: fixed;bottom: 0;width: 100vw;height: 22vw;z-index: 999;" ng-click="goBack()">
<div style="position: fixed;width:100%;height:100%;top:0;left:0;background: #000" id="loading">
    <img src="http://faxm.13w.top:2092/xxds/files/images/loading.gif" style="top: 40%;position: absolute;left: 50%;margin-left: -45px;margin-top: -45px;" />
</div>
<div class="main" style="display: none;">

    <div id="dialog" style="display:none">
        <img src="http://faxm.13w.top:2092/xxds/files/images/common/cancel.png" onclick="fuzhiMain.closeDialog()">
        <p id="main" class="main">
        </p>
        <p class="other">
            请手动复制
        </p>
    </div>

    <span class="copy-tip" id="tips" style="display:none">已复制到剪贴板</span>
    <img src="http://faxm.13w.top:2092/xxds/files/images/common/33fz.png" class="needsclick zhuonuo copyUrl" data-clipboard-action="copy" id="copy_btn" onclick="fuzhiMain.link()" />
    <textarea id="room_str" readonly="readonly"></textarea>

    <img src="http://faxm.13w.top:2092/xxds/files/images/redpackage/fly.png" style="width: 100%;margin-top:15%" usemap="#planetmap" />
    <div id="notopen" style="position: absolute; height: {{rpHeight}}px; width: {{rpWidth}}px; top: {{rpTop}}px; left: {{rpLeft}}px; display: none;">
        <img src="http://faxm.13w.top:2092/xxds/files/images/redpackage/redpackage_new_1.png" style="width: 100%; height:100%;" />

        <div class="user" style="position: absolute; height: {{width * 0.181}}; top: {{rpTop - rpTop * 0.76}}px; width: 100%; left: 0px;">
            <img ng-src="{{redPackage.sendAvatar}}" class="avatar" style="position: absolute; width:{{width*0.132}}px; height:{{width*0.132}}px; margin-left:{{(rpWidth - width * 0.132) / 2}}px; margin-top:{{width*0.02}}px; " />
        </div>

        <p style="position: absolute; color: rgb(255,227,104); width: 90%; left: 5%; top: {{rpHeight * 0.70}}; height: auto; text-align: center; font-size: 11pt; word-wrap: break-word; word-break: break-all;">{{redPackage.sendName}}<br />给你发了一个房卡包
        </p>

        <div class="btnOpen"  style="position: absolute; height: {{width * 1.02 / 4.5}}px; width: {{width * 1.02 / 4.5}}px; left: {{(rpWidth - width * 1.02 / 4.5) / 2}}px; top: {{rpHeight * 0.42}}px;" ng-click="clickOpenRedPackage()">
            <img src="http://faxm.13w.top:2092/xxds/files/images/redpackage/rp_get_1.png" style="width: 100%;position: relative;height:100%; transform: rotate({{img.rotate}}deg);" />
        </div>
        <!-- <div  style="position: absolute; height: {{width * 1.02 / 1.8 / 5.1}}px; width: {{width * 1.02 / 1.8}}px; left: {{(rpWidth - width * 1.02 / 1.8) / 2}}px; top: {{rpHeight * 0.45}}px;" ng-click="clickOpenRedPackage()">
            <img id="openImg" src="http://file.szlangya.cn/files/images/redpackage/redpackage_get_btn.png" style="width: 100%;position: relative;height:100%; " />
        </div>  -->

        <div style=" position: absolute; left: 22px; right: 22px; top: {{height - 160}}px;" >
            <p style="text-align: center; color: #fff; font-size: 11pt"></p>
        </div>
    </div>

    <div id="ropen" style="position: absolute; height: {{rpHeight}}px; width: {{rpWidth}}px; top: {{rpTop}}px; left: {{rpLeft}}px; display: none;">
        <img src="http://faxm.13w.top:2092/xxds/files/images/redpackage/redpackage_receive_new_1.png" style="width: 100%;height:100%" />

        <div class="user" style="position: absolute; height: {{width * 0.181}}; top: {{rpTop - rpTop * 0.76}}px; width: 100%; left: 0px;">
            <img ng-src="{{redPackage.sendAvatar}}" class="avatar" style="position: absolute; width:{{width*0.132}}px; height:{{width*0.132}}px; margin-left:{{(rpWidth - width * 0.132) / 2}}px; margin-top:{{width*0.02}}px; " />
        </div>

        <p style="position: absolute; color: rgb(255,227,104); width: 90%; left: 5%;top: {{rpHeight * 0.62}} ; text-align: center; font-size: 11pt;">{{redPackage.sendName}}的房卡包</p>


        <img ng-src="{{redPackage.receiveAvatar}}" ng-model="redPackage.receiveAvatar" class="avatarReceiver" style="position: absolute; top: {{rpHeight * 0.8}}px; left: {{rpX}}px; width:{{width * 0.1}}; height:{{width * 0.1}};  border-radius: 4px" />
        <p style="font-size: 11pt; position: absolute; color: black; text-align: left; top: {{rpHeight * 0.8}}px; left: {{receiveNameX}}px; width: {{receiveNameWidth}}px; height: auto;" ng-model="redPackage.receiveName">
            <span style="color: black; word-wrap: break-word; word-break: break-all; width: {{receiveNameWidth}};">{{redPackage.receiveName}}</span>
            <br />
            <span style="color: lightgray">{{redPackage.showTime}}</span>
        </p>

        <p style="font-size: 11pt; position: absolute; color: black; top: {{rpHeight * 0.8}}px; left: {{receiveNameX + receiveNameWidth + receiveNameOffset}}px; width: {{receiveCountWidth}}px; text-align: right; word-wrap: break-word; word-break: break-all;">{{redPackage.count}}张房卡</p>
    </div>

</div>
<script src="/xds/config.js" charset="utf-8"></script>

<script>
	 var hallUrl= window.location.href;
	 var hall= "xds";
	 var hallKey= getQueryVariable("h")?getQueryVariable("h"):"";
     function getQueryVariable(variable){
         var query = window.location.search.substring(1);
         var vars = query.split("&");
         for (var i=0;i<vars.length;i++) {
             var pair = vars[i].split("=");
             if(pair[0] == variable){return pair[1];}
         }
         return(false);
     }
	let token =localStorage.getItem('token');
	var wx_ip = "";
	var wx_port = "200";
	console.log("token :"+token);
	var userInfo = {
		id:0,
		cards: "0",
		nickname: "",
		headimgurl: "",
		individuality: "",
		is_opengroup: 0,
		tel: "",
		token: "",
	};

	var isReceive = {
		"isReceive":"",
		"content":"",
		"count":"",
		"sendName":"",
		"sendAvatar":"",
		"receiveName":"",
		"receiveAvatar":"",
		"receiveTime":"",
		"showTime":"",
		"code":"",
		"redUrl":"",
	};
	
	;
</script>
<script src="http://faxm.13w.top:2092/xxds/common.js" charset="utf-8"></script>
<script>
    var baseUrl= "http://" + window.location.host+"/"+hallKey+".html";
</script>
<script type="text/javascript">

    var globalData = {
        "baseUrl": 'http://faxm.13w.top:2092/xxds/',
        "hallPath":baseUrl,
        "isWechat": "1",
        "isXianliao": "0",
        "shareTitle":"房卡包",
        "rpdUrl": "http://" + window.location.host+isReceive.redUrl+"&h="+hallKey,
        "xlTitle":"房卡包",
        "roomUrl":hallUrl,
    };
    globalData.wid = "123"; globalData.tt = "YzIxNjhFeUhhTmxPc1lBSlthXVgzNFpVZ2lRVlQxcmNVNU9QTzVDY0ZUZmp4RkxxbGJ1ZnM=";

    var app = angular.module('app',[])

    app.directive('ngInput', [function () {
        return {
            restrict: 'A',
            require: '?ngModel',
            link: function(scope, element, attrs) {
                element.on('input',oninput);
                scope.$on('$destroy',function(){//销毁的时候取消事件监听
                    element.off('input',oninput);
                });
                function oninput(event){
                    scope.$evalAsync(attrs['ngInput'],{$event:event,$value:this.value});
                }
            }
        }
    }]);

    app.controller("myCtrl", function($scope,$http) {
        $scope.width = window.innerWidth;
        $scope.height = window.innerHeight;
        $scope.rpHeight = $scope.width * 1.02;
        $scope.rpWidth = $scope.width * 0.76
        $scope.rpLeft = $scope.width * 0.12;
        $scope.rpX = $scope.rpWidth * 0.08;
        $scope.rpTop = ($scope.height - $scope.rpHeight) / 2 - 30;
        $scope.lineTop = $scope.rpTop + $scope.rpHeight / 2;
        $scope.receiveNameX = $scope.rpX * 1.5 + $scope.width * 0.1;
        $scope.receiveNameWidth = ($scope.rpWidth - $scope.rpX * 3 - $scope.width * 0.1 ) / 1.5;
        $scope.receiveNameOffset = 2;
        $scope.receiveCountWidth = $scope.rpWidth - $scope.receiveNameX - $scope.receiveNameWidth - $scope.receiveNameOffset - $scope.rpX * 0.7;

        $scope.userInfo = {
            "id": userInfo.id.toString(),
		   "name": userInfo.nickname,
		   "avatar": userInfo.headimgurl,
		   "card": userInfo.cards,
        }

        $scope.redPackage = {
            "isReceive":isReceive.isReceive,
			"content":isReceive.content,
			"count":isReceive.count,
			"sendName":isReceive.sendName,
			"sendAvatar":isReceive.sendAvatar,
			"receiveName":isReceive.receiveName,
			"receiveAvatar":isReceive.receiveAvatar,
			"receiveTime":isReceive.receiveTime,
			"showTime":isReceive.showTime,
			"code":isReceive.code,
        }

        if ($scope.redPackage.isReceive == 0) {
            $scope.redPackage.receiveAvatar = $scope.userInfo.avatar;
            $scope.redPackage.receiveName = $scope.userInfo.name;
        }

        $scope.userInfo.card = userInfo.cards;

        var socketStatus = 0;
        $(".main").show();
        $("#loading").hide();


        $scope.activity = new Array();
        $scope.isShowAlert = false;
        $scope.alertType = 0;
        $scope.alertText = "";
        $scope.gotoHall = function() {
            //alert('你点击了我的');
            window.location.href = baseUrl;
        }
        $scope.showAlert=function(type,text){
            $(".alertText").css("top","90px")
            $scope.alertType=type;
            $scope.alertText=text;
            $scope.isShowAlert=true;

            setTimeout(function() {
                $scope.$apply();
            }, 0);

            setTimeout(function(){
                var wHeight = window.innerHeight;
                var alertHeight = $(".alertText").height();
                var textHeight = $(".alertText").height();

                if (alertHeight < wHeight * 0.15) {
                    alertHeight = wHeight * 0.15;
                }

                if (alertHeight > wHeight * 0.8) {
                    alertHeight = wHeight * 0.8;
                }

                var mainHeight = alertHeight + wHeight * (0.022 + 0.034) * 2 + wHeight * 0.022 + wHeight * 0.056;
                if (type == 8) {
                    mainHeight = mainHeight - wHeight * 0.022 - wHeight * 0.056
                }

                var blackHeight = alertHeight + wHeight * 0.034 * 2;
                var alertTop = wHeight * 0.022 + (blackHeight - textHeight) / 2;

                $(".alert .mainPart").css('height', mainHeight + 'px');
                $(".alert .mainPart").css('margin-top', '-' + mainHeight / 2 + 'px');
                $(".alert .mainPart .backImg .blackImg").css('height', blackHeight + 'px');
                $(".alert .mainPart .alertText").css('top', alertTop + 'px');

                $scope.$apply();
            },0)
        }
        $scope.closeAlert=function(){
            if($scope.alertType==1){
                $scope.isShowAlert=false;
                if(!$scope.is_connect){
                    $scope.is_connect=true;
                }
            }
            else{
                $scope.isShowAlert=false;
            }
        }



        $scope.cardNum = Number($scope.userInfo.card);
        $scope.number = 0; //输入数量
        $scope.inputNumber = null;  //输入框数字

        if ($scope.cardNum === null
            || $scope.cardNum === undefined
            || isNaN($scope.cardNum)) {
            $scope.cardNum = 0;
        }

        setTimeout(function () {
            if ($scope.redPackage.isReceive == 1) {
                $("#notopen").hide();
                $("#ropen").show();
            } else {
                $("#notopen").show();
                $("#ropen").hide();
            }

        }, 1);

        $scope.formatShowTime = function () {

            var newDate = new Date($scope.redPackage.receiveTime);
            newDate.setTime($scope.redPackage.receiveTime * 1000);
            var Month = (newDate.getMonth() + 1 < 10 ? '0' + (newDate.getMonth() + 1) : newDate.getMonth() + 1);
            var Day = newDate.getDate() + ' ';
            var Day = newDate.getDate() < 10 ? '0' + newDate.getDate() : newDate.getDate();
            var hour = newDate.getHours() < 10 ? '0' + newDate.getHours() : newDate.getHours();
            var min = newDate.getMinutes() < 10 ? '0' + newDate.getMinutes() : newDate.getMinutes();

            $scope.redPackage.showTime = Month + '-' + Day + '    ' + hour + ':' + min ;
        }

        $scope.formatShowTime();

        $scope.receiveRedPackage = function () {
            $http({
                url:domain+'/cos/receiveRP',
                method:'POST',
                header:{'Content-Type':'application/x-www-form-urlencoded'},
                data:{
                    'account_id':userInfo.id.toString(),
                    'token': token,
                    'code':$scope.redPackage.code,
                }})
                .success(function(data, header, config, status) {

                    var timestamp = Date.parse(new Date());
                    timestamp = timestamp / 1000;
                    $scope.redPackage.receiveTime = timestamp;
                    $scope.formatShowTime();

                    setTimeout(function () {
                        $(".btnOpen").removeClass('transf');

                        if (data.result == 0) {
                            $("#ropen").show();
                            $("#notopen").hide();
                        } else {
                            window.location.reload();
                            //alert(data.result_message);
                        }
                    }, 500);
                })
                .error(function(data, header, config, status) {
                    $(".btnOpen").removeClass('transf');
                    window.location.reload();
                    //alert(data.result_message);
                });
        }


        setTimeout(function() {
            var tempDiv = document.getElementById('openImg');
            if (tempDiv) {
                tempDiv.addEventListener('touchstart', function(event) {
                    $('#openImg').animate({top:"-10%",left:"-10%",width:"120%",height:"120%"},30);
                }, false);

                tempDiv.addEventListener('touchend', function(event) {
                    $('#openImg').animate({top:"0%",left:"0%",width:"100%",height:"100%"},30);
                }, false);
            }
        }, 100);

        $scope.clickOpenRedPackage = function() {
            $(".btnOpen").addClass('transf');
            //$('#openImg').animate({top:"-10%",left:"-10%",width:"120%",height:"120%"},30);
            $scope.receiveRedPackage();
            setTimeout(function() {
                //$('#openImg').animate({top:"0%",left:"0%",width:"100%",height:"100%"},30);
            }, 0);
        }


        /* 绑定手机 */
        $scope.isAuthPhone = "1";
        $scope.phone = userInfo.tel;
        $scope.sPhone='';
        $scope.sAuthcode='';
        $scope.authcodeType=1;
        $scope.authcodeText='发送验证码';
        $scope.authcodeTime=60;
        $scope.phoneType=1;
        $scope.phoneText='绑定手机';

        setTimeout(function() {
            $scope.$apply();
        }, 100);

        $scope.goBack = function(){
            let url = globalData.hallPath;
            window.location.replace(url);
        },

        $scope.getAuthcodeHttp=function(phone){
            $http({
                url:domain+'/cos/getMobileSms',
                method: 'POST',
                headers:{
                    'Content-Type': 'application/json; charset=utf-8'
                },
                data:{
                    "phone":phone,
                    "token": token,
                    "session":"",
                },
            }).success(function(data){

                if (data.result==0) {
                    setTimeout(function() {
                        $scope.authcodeTime = 60;
                        authcodeTimer();
                        $scope.authcodeType = 2;
                    }, 0);

                } else {
                    alert(data.result_message)
                }
            }).error(function(data){
                console.log(data);
            });
        };

        $scope.bindPhoneHttp=function(phone,authcode){
            $http({
                url:domain+'/cos/checkSmsCode',
                method: 'POST',
                headers:{
                    'Content-Type': 'application/json; charset=utf-8'
                },
                data:{
                    "phone":phone,
                    "code":authcode,
                    "token": token,
                    "session":"",
                },
            }).success(function(data){

                if(data.result==0){
                    setTimeout(function() {
                        $scope.isAuthPhone = 0;
                        $scope.phone = $scope.sPhone;

                        if (data.data.account_id != $scope.userInfo.id) {
                            $scope.showAlert(23,data.result_message);
                        } else {
                            $scope.showAlert(6,data.result_message);
                        }

                        $scope.userInfo.card = parseInt($scope.userInfo.card) + parseInt(data.data.card_count);

                        $scope.sPhone = '';
                        $scope.sAuthcode = '';
                        $scope.$apply();
                    }, 0);
                } else{
                    setTimeout(function() {
                        $scope.showAlert(6,data.result_message);
                        $scope.$apply();
                    }, 0);
                }
            }).error(function(data){
                setTimeout(function() {
                    $scope.authcodeTime = 0;
                    $scope.showAlert(6,"绑定失败");
                    $scope.$apply();
                }, 0);
            });
        };


        $scope.finishBindPhone = function () {
            window.location.href=window.location.href+"&id="+10000*Math.random()+"&wid=123";
        };

        $scope.reloadView = function () {
            window.location.href=window.location.href+"&id="+10000*Math.random()+"&wid=123";
        };

        $scope.bindPhone = function () {
            var validPhone = checkPhone($scope.sPhone);
            var validAuthcode = checkAuthcode($scope.sAuthcode);

            if (validPhone == false) {
                setTimeout(function() {
                    $scope.showAlert(6,'手机号码有误，请重填');
                }, 0);

                return;
            }

            if (validAuthcode == false) {
                setTimeout(function() {
                    $scope.showAlert(6,'验证码有误，请重填');
                }, 0);

                return;
            }

            $scope.bindPhoneHttp($scope.sPhone,$scope.sAuthcode);
        };

        $scope.getAuthcode = function () {
            if ($scope.authcodeType != 1) {
                return;
            }

            var color = $('#authcode').css('background-color');

            if (color != 'rgb(64, 112, 251)') {
                return;
            }

            var validPhone = checkPhone($scope.sPhone);

            if (validPhone == false) {
                setTimeout(function() {
                    $scope.showAlert(6,'手机号码有误，请重填');
                }, 10);

                return;
            }

            $scope.getAuthcodeHttp($scope.sPhone);
        };

        $scope.phoneChange = function () {
            var result = checkPhone($scope.sPhone);
            if (result) {
                $('#authcode').css('background-color','rgb(64,112,251)');
            } else {
                $('#authcode').css('background-color','lightgray');
            }
        };

        function checkPhone(phone) {

            if (!(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
                return false;
            } else {
                return true;
            }
        };

        function checkAuthcode(code) {
            if (code == '' || code == undefined) {
                return false;
            }

            var reg = new RegExp("^[0-9]*$");
            if (!reg.test(code)) {
                return false;
            } else {
                return true;
            }
        };

        var authcodeTimer = function authcodeTimer() {
            if ($scope.authcodeTime <= 0) {
                $scope.authcodeText = '发送验证码';
                $scope.authcodeTime = 60;
                $scope.authcodeType = 1;
                return;
            }

            $scope.authcodeTime = $scope.authcodeTime - 1;
            $scope.authcodeText = $scope.authcodeTime + 's';

            setTimeout(function() {
                $scope.$apply();
            }, 0);

            setTimeout(function () {
                authcodeTimer();
            }, 1000);
        };

    })

    $(function () {
        wx.config({
            debug: false,
            appId: "wx242d21281bb6c45e",
            timestamp: "1640587770",
            nonceStr:"de188bbd51fe3ca150ee5353e243191c",
            signature: "d76674628210b9708e0add388c7cff2e30e057ae",
            jsApiList: [
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'hideMenuItems',
            ]
        });

        wx.ready(function () {
            wx.hideMenuItems({
                menuList: [
                    "menuItem:copyUrl",
                    "menuItem:share:qq",
                    "menuItem:share:weiboApp",
                    "menuItem:share:facebook",
                    "menuItem:share:QZone",
                    "menuItem:editTag",
                    "menuItem:copyUrl",
                    "menuItem:share:email",
                ] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
            });

            wx.onMenuShareTimeline({
                title: "房卡包",
                desc: "嘛ξ咩蒙给你发了一个房卡包",
                link: hallUrl,
                imgUrl: "http://faxm.13w.top:2092/xxds/files/images/redpackage/share_icon.jpg",
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });

            wx.onMenuShareAppMessage({
                title: "房卡包",
                desc: "嘛ξ咩蒙给你发了一个房卡包",
                link: hallUrl,
                imgUrl: "http://faxm.13w.top:2092/xxds/files/images/redpackage/share_icon.jpg",
                success: function () {
                    // 用户确认分享后执行的回调函数
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });
        });
    });
</script>
    <script type="text/javascript" src="http://faxm.13w.top:2092/xxds/files/js/fuzhi_xl.js?v=20118029173"></script>
<script type="text/javascript">
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        // 通过下面这个API隐藏右上角按钮
        WeixinJSBridge.call('hideOptionMenu');
    });
</script>
</body>
</html>